There is conventionally known an image forming apparatus capable of determining a type of a cartridge detachably mounted in a main casing of the image forming apparatus. More specifically, the cartridge has a casing for accommodating developer therein, a rotating body mounted in the casing and rotatable upon receipt of a drive force from a drive source, and a detection protrusion provided at a part of the rotating body. The detection protrusion has a length in a rotating direction that differs depending on a capacity of the casing. On the other hand, the main casing has a detection actuator and an optical sensor that detect the detection protrusion during rotation of the rotating body.
In this image forming apparatus, when the cartridge is mounted in the main casing and then, for example, a front cover is closed, a warming-up operation (idle rotation) is executed by a control device. Here, the idle rotation means an operation that rotates an agitation member in the cartridge so as to agitate the developer in the cartridge.
In such an idle rotation, a drive force is transmitted to the rotating body from a motor drive source provided in the main casing to cause the rotating body to rotate by a predetermined amount. The control device determines a type of the cartridge based on a length of time during which the detection actuator and the optical sensor detect the detection protrusion.